// figuras.h: interface for the figuras class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FIGURAS_H__1E4008BF_11A9_4354_94AB_77F566261316__INCLUDED_)
#define AFX_FIGURAS_H__1E4008BF_11A9_4354_94AB_77F566261316__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <GL\glut.h> 
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <iostream.h>

#include <SDL_image.h>
#include <SDL.h>
#include <SDL_mixer.h>


#define max 3000
#define menosinfinito -99999
#define masinfinito 99999

using namespace std;

typedef struct {
	double posX;
	double posY;
} tPunto;

class figuras  
{
private:
	 int maxx[max];
	 int minx[max];
	 int x0, y0, x1, y1;
	 int dx, dy, e, ix, iy;
	 
	 float radio;

	 vector <tPunto> aPuntos;
	 Uint8 cR;
	 Uint8 cG;
	 Uint8 cB;
	
	 void bhmRecta1_7(SDL_Surface *screen);
	 void bhmRecta3_5(SDL_Surface *screen);
	 void swapPuntos();
	
	 void bhmScanLine1_7(SDL_Surface *screen);
	 void bhmScanLine3_5(SDL_Surface *screen);
	 void bhmScanLine(SDL_Surface *screen,int x0, int y0, int x1, int y1);    
	 void bhmScanLineInit(SDL_Surface *screen);	
	 void bhmScanLineRellenar(SDL_Surface *screen);
		
public:
	figuras();
	virtual ~figuras();
	//------------------- Metodos Publicos ----------------------------
	void dibujarPunto(SDL_Surface *screen, int x, int y);
    void dibujarCirculo(SDL_Surface *screen,float r, int x0, int y0);
	void dibujarSegmento(SDL_Surface *screen,int x0, int y0, int x1, int y1);
	void dibujarPoligono(SDL_Surface *screen);
	void setearColor(Uint8 r, Uint8 g, Uint8 b);
	void rellenarCirculo(SDL_Surface *screen);
	void rellenarPoligono(SDL_Surface *screen);
	void insertarPunto(int x, int y);
	void quitarPunto();
	void liberarPuntos();
    //-----------------------------------------------------------------

};

#endif // !defined(AFX_FIGURAS_H__1E4008BF_11A9_4354_94AB_77F566261316__INCLUDED_)
